//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "tyr_airdrop\fn_onload.sqf"
#include <core_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_counter","_name"];

disableSerialization;

lbclear 1151;
lbclear 1152;

if ((GVAR(WITH_VEHICLE) || GVAR(WITH_AMMO) || GVAR(WITH_STATIC)) && (GVAR(AVAILABLE_VEHICLES) != 0) && !GVAR(TRANSPORTER_IN_THE_AIR)) then {
	if (!([player] call FUNC(checkPlayer))) then {
		closedialog 0;
		hint localize "STR_TYR_DROP_EQUIPRADIO";
	} else {
		_counter = 0;
		if (GVAR(WITH_AMMO)) then {
			lbAdd [1151,localize "STR_TYR_DROP_AMMO_BOX"];
			lbSetData [1151,_counter,"0"];
			INC(_counter);
		};
		if (GVAR(WITH_VEHICLE)) then {
			lbAdd [1151,localize "STR_TYR_DROP_VEHICLES"];
			lbSetData [1151,_counter,"1"];
			INC(_counter);
		};
		if (GVAR(WITH_STATIC)) then {
			lbAdd [1151,localize "STR_TYR_DROP_STATIC"];
			lbSetData [1151,_counter,"2"];
			INC(_counter);
		};
		if (_counter > 0) then {
			lbSetCurSel [1151,0];
		};
	};
} else {
	closedialog 0;
	hint localize "STR_TYR_DROP_NOTAVAILABLE";
};
TRACE("End");
TMFPROFILERSTOP;